package com.example.controller;


import com.example.pojo.education;
import com.example.pojo.major;
import com.example.dto.result;
import com.example.service.MajorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/major")
public class MajorController {
    @Autowired
    MajorService majorService;

    //获取专业表
    @GetMapping("/majorList")
    public result getMList(){
        List<major> m = majorService.getMList();
        return result.success(m);
    }

    //获取学历表
    @GetMapping("/eduList")
    public result getEList(){
        List<education> e = majorService.getEList();
        return result.success(e);
    }
}
